home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume18 / mush6.4 / part19 < prev    next >
Encoding:
Internet Message Format  |  1989-03-12  |  51.8 KB

  1. Subject:  v18i041:  Mail user's shell version 6.4, Part19/19
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Dan Heller <island!argv@sun.com>
  7. Posting-number: Volume 18, Issue 41
  8. Archive-name: mush6.4/part19
  9.  
  10.  
  11.  
  12. #! /bin/sh
  13. # This is a shell archive.  Remove anything before this line, then unpack
  14. # it by saving it into a file and typing "sh file".  To overwrite existing
  15. # files, type "sh file -c".  You can also feed this as standard input via
  16. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  17. # will see the following message at the end:
  18. #        "End of archive 19 (of 19)."
  19. # Contents:  mush.1.1
  20. # Wrapped by rsalz@papaya.bbn.com on Mon Mar 13 19:25:25 1989
  21. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  22. if test -f 'mush.1.1' -a "${1}" != "-c" ; then 
  23.   echo shar: Will not clobber existing file \"'mush.1.1'\"
  24. else
  25. echo shar: Extracting \"'mush.1.1'\" \(49833 characters\)
  26. sed "s/^X//" >'mush.1.1' <<'END_OF_FILE'
  27. X.\" Mush Man Page: Copyright (c) 1987 Dan Heller
  28. X.\" Cleaned up January 1988 by Bart Schaefer <schaefer@cse.ogc.edu>
  29. X.\"
  30. X.if n .ds Q \&"
  31. X.if n .ds U \&"
  32. X.if t .ds Q \&``
  33. X.if t .ds U \&''
  34. X.if n .ds - --
  35. X.if t .ds - \(em
  36. X.nh
  37. X.TH MUSH 1 "Oct 24, 1988" "Version 6.4"
  38. X.UC 4
  39. X.SH NAME
  40. XThe Mail User's Shell \- Shell for electronic mail.
  41. X.SH SYNOPSIS
  42. X.B mush
  43. X[
  44. X.B \-n
  45. X]
  46. X[
  47. X.B \-v
  48. X]
  49. X[
  50. X.B \-s
  51. Xsubject
  52. X]
  53. X[
  54. X.B \-c
  55. Xcc-list
  56. X]
  57. X[
  58. X.B \-b
  59. Xbcc-list
  60. X]
  61. X[
  62. Xaddress-list
  63. X]
  64. X.br
  65. X.B mush
  66. X[
  67. Xmode-options
  68. X]
  69. X[
  70. Xfile-options
  71. X]
  72. X.SH INTRODUCTION
  73. XThe Mail User's Shell (Mush) is an interface for sending and manipulating
  74. Xa database of electronic mail messages under the
  75. X.IR UNIX (TM)
  76. Xenvironment.
  77. XThere are three user interfaces that allow the user to interact with
  78. X.I Mush.
  79. XThe default interface is the conventional tty-based line mode
  80. Xsimilar to command line interpreters such as
  81. X.I csh
  82. Xas well as other mailers, such as University of California, Berkeley's
  83. X.I Mail
  84. Xand Bell Lab's System V
  85. X.I mailx
  86. Xinterface.
  87. XThis mode requires nothing from the terminal in terms of screen
  88. Xcapability and may be run on many different versions of the
  89. X.IR UNIX (TM)
  90. Xoperating system.
  91. X.PP
  92. XThe text-graphics
  93. X.RI ( curses )
  94. Xinterface is reminiscent of the
  95. X.I vi
  96. Xvisual editor, but is user-configurable to simulate other editors.
  97. XThis interface does not require graphics capabilities of
  98. Xthe computer or the terminal on which it is run, but the terminal must
  99. Xhave the minimum capabilities required by any visual screen editor.
  100. X.PP
  101. XThe
  102. X.I window
  103. Xinterface for the Sun Workstation utilizes the icon and
  104. Xmenu based (mouse selectable) windowing system.
  105. XThis
  106. X.I tool
  107. X(graphics) mode is highly subject to the version of operating system
  108. Xyour Sun may be running.
  109. XWhile the program works with variable levels of success on earlier versions, it
  110. Xis intended to be run on Sun versions 2.0 and higher.
  111. XSee the BUGS section at the end for more information.
  112. X.PP
  113. XSee the corresponding sections for more information on the user
  114. Xinterface desired.
  115. XMost of this manual deals with commands, variables
  116. Xand actions that are common to all three interfaces although
  117. Xsome attention is paid to individual characteristics of each interface.
  118. X.PP
  119. XThe following command line arguments are understood by
  120. X.I Mush
  121. X(full word forms in parentheses):
  122. X.TP
  123. X\-b
  124. X(\-blindcarbon, \-blind)
  125. XThe list of Blind Carbon Copy recipients is set on the command line.
  126. XIf more than one address or an address containing spaces is specified, the
  127. Xentire list should be enclosed in quotes.
  128. XThis option applies when sending mail only.
  129. XIf you are entering the shell, curses mode, or the tool mode, this option is
  130. Xignored.
  131. X.TP
  132. X\-C
  133. X(\-curses)
  134. XEnter the mailer in curses mode upon startup.
  135. X.TP
  136. X\-c cc-list
  137. X(\-carbon, \-copy)
  138. XThe list of Carbon Copy recipients is set on the command line.
  139. XIf more than one address or an address containing spaces is specified, the
  140. Xentire list should be enclosed in quotes.
  141. XThis option applies when sending mail only.
  142. XIf you are entering the shell, curses mode, or the tool mode, this option is
  143. Xignored.
  144. X.TP
  145. X\-d
  146. X(\-debug)
  147. XTurns on the debugging level to 1.
  148. XYou can change debugging levels from within the shell using the
  149. X.B debug
  150. Xcommand.
  151. X.TP
  152. X\-F[!] filename
  153. X(\-source)
  154. XThis file is the same type as the initialization file read on startup
  155. X(see INITIALIZATION) with the exception that commands that manipulate
  156. Xor search messages may be given.
  157. XNormally, such commands may not appear in the initialization file since
  158. Xthat file is read before the folder is scanned.
  159. XThe file specified by \-F is read after the folder is scanned, so
  160. Xcommands that affect messages are allowed.
  161. XThe optional `!' argument prevents the shell from running after the
  162. Xfile has been sourced.
  163. XOtherwise,
  164. X.I Mush
  165. Xcontinues into whatever interface has been specified.
  166. X.TP
  167. X\-f [ filename ]
  168. X(\-folder)
  169. XThe optional filename argument specifies a folder containing mail messages.
  170. XWith no argument,
  171. X.B mbox
  172. Xin the current directory (or the variable
  173. X.BR mbox )
  174. Xis used.
  175. XIf no filename is given, this option must be last on the command line.
  176. X.TP
  177. X\-H[:c]
  178. X(\-headers)
  179. XHave
  180. X.I Mush
  181. Xdisplay mail headers without entering the shell.
  182. XSee the
  183. X.B headers
  184. Xcommand for information on the
  185. X.B :c
  186. Xargument.
  187. XNo colon modifier is equivalent to \*Q\-H:a\*U.
  188. XThis option prevents the shell from running, so this option will turn off the
  189. X\-S and \-C flags.
  190. XThis option is ignored if the tool mode is in effect.
  191. X.TP
  192. X\-i
  193. X(\-interact)
  194. XForces interactive mode even if input has been redirected to the program.
  195. XThis is intended for remote host mail sessions but also allows
  196. Xthe user to redirect \*Qscripts\*U of
  197. X.I Mush
  198. Xcommands.
  199. XSee the INITIALIZATION section for information on how to
  200. Xwrite scripts that deal with mail.
  201. XNote that this flag is different from the \*Qignore\*U flag of UCB Mail.
  202. X.TP
  203. X\-N
  204. X(\-noheaders)
  205. XEnter
  206. X.I Mush
  207. Xwithout displaying any message headers.
  208. XThis argument is passed to the
  209. X.B folder
  210. Xcommand.
  211. X.TP
  212. X\-n
  213. X(\-noinit)
  214. XNo initialization is done on start up.
  215. XThat is, do not source
  216. X.I .mushrc
  217. Xor
  218. X.I .mailrc
  219. Xfiles.
  220. XSee the INITIALIZATION section for more information on
  221. Xstartup and the significance of these files.
  222. X.TP
  223. X\-r
  224. X(\-readonly)
  225. XInitialize the folder in Read-Only mode; no modification of the folder is
  226. Xpermitted.
  227. XThis argument is passed on to the
  228. X.B folder
  229. Xcommand.
  230. X.TP
  231. X\-S
  232. X(\-shell)
  233. XThis flag allows the user to enter the shell even if the system
  234. Xmailbox or specified folder is empty or doesn't exist.
  235. X.TP
  236. X\-s subject
  237. X(\-subject)
  238. XThe subject is set on the command line using this flag.
  239. XIf the subject has
  240. Xany spaces or tabs, the entire subject should be enclosed in quotes.
  241. XThis applies when sending mail only.
  242. XIf you are entering the shell,
  243. Xcurses mode, or the tool mode, this option is ignored.
  244. X.TP
  245. X\-T timeout
  246. X(\-timeout)
  247. XIn the tool mode (Sun only),
  248. X.I timeout
  249. Xspecifies the length of time (seconds) to wait between each check for new mail.
  250. X30 seconds is the smallest time allowed for performance reasons.
  251. X60 seconds is the default value.
  252. X.TP
  253. X\-t
  254. X(\-tool)
  255. XUse the graphics tool mode (Sun only).
  256. X.TP
  257. X\-u [ user ]
  258. X(\-user)
  259. XThe mailbox to use is /usr/spool/mail/\fBuser\fR.
  260. XIf the login name for user is not specified, then root is used.
  261. X.TP
  262. X\-m mailbox-path
  263. X(\-mailbox)
  264. XThe mailbox specified will be interpreted as if it were the user's main
  265. X(system) mailbox in place of /usr/spool/mail/$USER (or whatever path is
  266. Xapplicable for your system and Mail Transport Agent).
  267. X.TP
  268. X\-v
  269. X(\-verbose)
  270. XVerbose mode is turned on.
  271. XThis option is passed to the actual mail delivery
  272. Xsubsystem internal to your version of
  273. X.IR UNIX (TM).
  274. XSome mailers do not have a verbose option, so this flag may not apply
  275. Xto your system (System V, for example).
  276. XThis applies when sending mail only.
  277. XIf you are entering the shell,
  278. Xcurses mode, or the tool mode, this option is ignored.
  279. X.TP
  280. X\-1 cmd_help
  281. X.ns
  282. X.TP
  283. X\-2 tool_help
  284. X.rs
  285. X(\-help, \-sunhelp)
  286. XSpecify alternate locations of help files.
  287. XThese should be full pathnames accessible for reading.
  288. XThis is usually done if a binary copy of
  289. X.I Mush
  290. Xhas been copied from another machine and the wrong pathnames to the
  291. Xhelp files cannot be changed.
  292. X.SH FEATURES
  293. X.BR "New Mail" .
  294. X.PP
  295. XIf during a
  296. X.I Mush
  297. Xsession, new mail arrives for you, it is automatically incorporated into
  298. Xyour system mailbox and you are told that new mail has arrived.
  299. X.PP
  300. XIn the default line mode, new mail is checked between each command
  301. Xissued.
  302. XIn the curses mode, new mail is checked on each
  303. Xcommand and is displayed in the bottom line of the screen.
  304. XIn the tool based graphics mode, new mail is checked approximately
  305. Xevery minute or by the number of seconds specified by the
  306. X.B -T
  307. Xoption on the command line.
  308. X.PP
  309. XIf you are using your system mailbox as your \*Qcurrent folder,\*U then the
  310. Xnew mail is added immediately to your current
  311. Xlist of messages and information similar to the following example is
  312. Xdisplayed, to tell you whom the mail is from:
  313. X.sp
  314. X.ti +2
  315. XNew mail: (#15) island!argv@sun.com (Dan Heller)
  316. X.sp
  317. XIf you are not in your system mailbox, then the new mail will not be added
  318. Xto your list of messages, but you will instead be informed of the new arrival.
  319. X.sp
  320. XIf you are using the tool based mode and
  321. X.I Mush
  322. Xis closed to an iconic state, then the number of messages in the current
  323. Xfolder is displayed on the mailbox icon and the flag on the mailbox will go up.
  324. X.PP
  325. X.BR History .
  326. X.PP
  327. XIn the line-mode interface,
  328. X.I Mush
  329. Xsupports a history mechanism similar to that supplied by
  330. X.IR csh .
  331. XA subset of
  332. X.I csh
  333. Xhistory modifiers are supported to reference previously
  334. Xissued commands and to extract specified arguments from these commands.
  335. X.PP
  336. X.BR "Mail Aliases" .
  337. X.PP
  338. XMail aliases are shorthand names for long mail addresses.
  339. XThese are supported in the same manner as UCB Mail supports them.
  340. XBecause
  341. X.I Mush
  342. Xhas command line history reminiscent of
  343. X.IR csh ,
  344. Xcommands that use UUCP's `!' character for user-host and host-host
  345. Xseparation should be escaped (preceded by a backslash).
  346. XThis is not necessary in the initialization file (.mushrc) because history
  347. Xreferencing is ignored while these files are being sourced.
  348. XSee the INITIALIZATION and LINE-MODE INTERFACE sections for more
  349. Xinformation on initialization file format and the history mechanism.
  350. X.PP
  351. XAliases reference normal mailing addresses as well as other aliases.
  352. XIf a loop is detected, then the user will be notified and the message will
  353. Xbe forced into the file
  354. X.B dead.letter
  355. Xin the user's home directory.
  356. XThe
  357. X.B unalias
  358. Xcommand is used to reverse the effects of the
  359. X.B alias
  360. Xcommand.
  361. X.PP
  362. X.BR "Command Line Aliases" .
  363. X.PP
  364. XCommand aliases are different from mail aliases in that they are used
  365. Xto expand to commands.
  366. XThe usage of command line aliases is similar to that supplied by
  367. X.IR csh .
  368. X.PP
  369. X.BR "Command Pipes" .
  370. X.PP
  371. X.I Mush
  372. Xcommands can be \*Qpiped\*U to one another so as to provide output of
  373. Xone command to be used as input to the next command in the pipeline.
  374. XHowever, the output of commands is not the \*Qtext\*U that is returned
  375. X(as it is in
  376. X.IR csh )
  377. Xbut a list of the messages that were affected.
  378. X.PP
  379. X.BR Help .
  380. X.PP
  381. X.I Mush
  382. Xwas designed so that each command or action should not be a mystery.
  383. XHelping the user understand what to do and how to do whatever he wishes
  384. Xis the goal behind the help facility.
  385. XFor this reason, the
  386. X.B help
  387. Xcommand gives information on both general usage and a few specific help
  388. Xcategories.
  389. X.PP
  390. XIn text mode, most help is gotten by typing \-? as an argument to a
  391. Xcommand.
  392. XAmost every command has the \-? option.
  393. XWhen this option is specified, most commands will attempt to read from
  394. Xa help file a brief explanation of the functionality of the command.
  395. XIf necessary, a pointer to other sources of information will
  396. Xbe given to fully explain a concept.
  397. X.PP
  398. XIn the curses mode, the `?' key will display a list of the current
  399. Xkey-to-command bindings; a keystroke or set of keystrokes correspond
  400. Xdirectly to a command.
  401. X.PP
  402. XIn the tool/graphics mode, this is
  403. Xalso available, but more extensive help is provided in the pop-up menus.
  404. XPop-up menus can be gotten from virtually anywhere on the screen; press the
  405. XRIGHT mouse button (the \*Qmenu button\*U) and a number of items will appear
  406. Xin a menu.
  407. XThe last command in the menu list will be one labelled \*Qhelp\*U.
  408. XSelecting this menu item will display a \*Qhelp box\*U in the center of the
  409. Xconsole and wait for input to remove the box.
  410. X.PP
  411. X.BR "Sorting mail" .
  412. X.PP
  413. X.I Mush
  414. Xallows you to sort your mail according to various constraints such
  415. Xas time, status (new, unread, deleted, etc.), author and subject.
  416. XSee the
  417. X.B sort
  418. Xcommand in the COMMANDS section for more information on sorting.
  419. X.PP
  420. X.B Picking specific messages.
  421. X.PP
  422. XYou can select messages that contain unique information, or from
  423. Xmessages that have special attributes.
  424. XYou have the option of restricting your search to messages between dates,
  425. Xmessage numbers, author names and other constraints.
  426. X.SH INITIALIZATION
  427. XAfter the command line arguments have been interpreted, if the argument
  428. X.B -n
  429. Xis not given,
  430. X.B Mush
  431. Xwill read commands from an
  432. X.B "initialization file"
  433. Xthat (typically) sets variable values, aliases, command line aliases,
  434. Xand so forth.
  435. XThe default system initialization file is read first and then the
  436. Xuser's personal initialization file is read.
  437. XThe system default file
  438. Xis set up by the system administrator and may contain commands that
  439. Xshould be set system-wide.
  440. X.PP
  441. XThe user's file is determined by first looking for the environment variable
  442. X.IR MAILRC .
  443. XIf that file isn't found, then the file
  444. X.I .mushrc
  445. Xis searched for in the home directory of the user.
  446. XIf that file cannot be found,
  447. X.I Mush
  448. Xwill attempt to read the file
  449. X.I .mailrc
  450. Xfrom the same directory.
  451. XFinally, if that file cannot be read, no initialization is done
  452. Xand the default values will be in effect.
  453. X.PP
  454. XIf the user has no home directory, or permissions prevent read/write access
  455. Xto $HOME, /tmp is used as the home directory.
  456. XSee the
  457. X.B home
  458. Xvariable under the VARIABLES section.
  459. X.PP
  460. XOnce in the shell, the
  461. X.B source
  462. Xcommand may be used to specify a file if you want to read commands
  463. Xfrom a file other than the default.
  464. XThe command
  465. X.B saveopts
  466. Xwill save all variable settings, aliases, and all other
  467. X.I Mush
  468. Xsettable attributes, to aid in creating an initialization file.
  469. XIf no filename is given on the command line,
  470. Xthe
  471. X.B source
  472. Xand
  473. X.B saveopts
  474. Xcommands choose a file in the manner described above.
  475. X.B Saveopts
  476. Xwill not overwrite the file if it exists.
  477. XIn such cases, you will be prompted to confirm overwrite.
  478. XIf you confirm overwriting the existing file, remember that existing \*Qif\*U
  479. Xexpressions or other manually entered comments or non variable-setting type
  480. Xcommands that previously existed in the file will be lost.
  481. X.PP
  482. XNo interactive commands should be called from any initialization file.
  483. XThese commands are not prevented because it is impossible to trace which
  484. Xcommands are actually
  485. X.IR UNIX (TM)
  486. Xcommands that will be interactive.
  487. XThe responsibility of not running interactive commands is left to the user.
  488. XBecause the initialization file is read
  489. X.I before
  490. Xany messages are read into the program,
  491. Xmessage filtering commands should not be placed in this file unless you know
  492. Xyou're going to
  493. X.IB re- source
  494. Xthe file later as a command.
  495. X.PP
  496. X.IR "Initialization File Format" .
  497. XWhen reading the initialization file,
  498. X.I Mush
  499. Xwill recognize the `#' character as a comment character.
  500. XIt may be anywhere on a line in the file.
  501. XWhen that character is encountered,
  502. Xprocessing of that line is discontinued to the end of the line.
  503. XIf the `#' is enclosed in quotes (single or double), then it is not
  504. Xconsidered a comment.
  505. XExamples:
  506. X.sp
  507. X.ti +2
  508. Xset shell = /bin/csh  # set the shell variable
  509. X.ti +2
  510. X# this entire line has been commented out.
  511. X.ti +2
  512. Xset prompt = "Message #%m: "  # The `#' is within quotes
  513. X.PP
  514. XThe
  515. X.B exit
  516. Xcommand has special meaning in the initialization file.
  517. XIf the command is found,
  518. X.I Mush
  519. Xwill not exit, but rather, discontinue reading from the file immediately.
  520. X.PP
  521. XThere may be \*Qif\*U expressions within the initialization file to determine
  522. Xcertain runtime states of
  523. X.IR Mush .
  524. XNo parentheses are allowed and only one boolean expression may be
  525. Xevaluated per line; that is, no \*Q&&\*U or \*Q|\||\*U may be used in
  526. Xexpressions.
  527. XAn \*Qelse\*U on a line by itself may precede alternative
  528. Xactions.
  529. X\&\*QIf\*U expressions may be nested to any reasonable depth, but
  530. Xthere must always be an \*Qendif\*U matching each \*Qif\*U expression.
  531. XThe statements associated with an \*Qif\*U expression are never on the
  532. Xsame line with the conditional expression.
  533. X.PP
  534. XConditional expressions understood include the internal variables
  535. X.IR istool ,
  536. X.IR iscurses ,
  537. X.IR hdrs_only ,
  538. X.IR is_sending ,
  539. Xand
  540. X.IR redirect .
  541. XIf
  542. X.I istool
  543. Xis true, the program is going to run in the tool mode.
  544. XIf
  545. X.I iscurses
  546. Xis true, the program is in or is going to run in the curses mode even
  547. Xthough the screen package may not yet have been started.
  548. XIf
  549. X.I hdrs_only
  550. Xis true, then the -H flag on the command line has been given.
  551. XIf
  552. X.I is_sending
  553. Xis true, then the user is sending mail to a user.
  554. XThis does not imply
  555. Xthat the user is not going to be running a shell after the mail is sent.
  556. XIf
  557. X.I redirect
  558. Xis true, then input to the program is redirected.
  559. XThe test for redirection tells whether input, not output, has been
  560. Xredirected to the program.
  561. XThe
  562. X.B \-i
  563. Xoption on the command line is required to run the shell if redirect is on.
  564. XIf \-i is specified, the value for
  565. X.I redirect
  566. Xwill be set to false.
  567. XThese are internal variables whose values cannot be referenced using the
  568. X\*Q$variable\*U method of variable expansion.
  569. X.PP
  570. XThe `!' operator may be used to negate expressions, thus,
  571. X.sp
  572. X.nf
  573. X.in +2
  574. Xif !istool
  575. X.ti +4
  576. Xexit
  577. Xelse
  578. X.ti +4
  579. Xset autoprint
  580. Xendif
  581. X.in -2
  582. X.fi
  583. X.sp
  584. Xmeans that if you are not running as a tool, stop reading commands from this
  585. Xfile.
  586. XOtherwise, set the autoprint variable.
  587. X.sp
  588. X.in +2
  589. X.nf
  590. Xset hdr_format = "%25f %7d (%l/%c) %25s"
  591. Xif hdrs_only
  592. X.ti +4
  593. Xexit
  594. Xendif
  595. X.in -2
  596. X.fi
  597. X.sp
  598. XThis tells the program to set the hdr_format variable and check to see if
  599. Xwe're running the program to read headers only.
  600. XIf so, stop reading this file (exit) and continue on with the program.
  601. XThis speeds up runtime quite a bit for those who have lengthy initialization
  602. Xfiles, because no other shell variables are necessary.
  603. X.sp
  604. X.in +2
  605. X.nf
  606. Xif !iscurses
  607. X.ti +4
  608. Xset crt = 24 screen = 18
  609. Xendif
  610. X.in -2
  611. X.fi
  612. X.sp
  613. XThis segment checks to see that we're not running in curses mode, and if not
  614. Xit will set our crt and screen sizes.
  615. XThis is mostly because the curses mode will set those values for us by looking
  616. Xat the size of the screen.
  617. XLike other interactive commands, the
  618. X.B curses
  619. Xcommand itself should never be called from an initialization file.
  620. XDoing so will cause terminal settings to be set incorrectly and cause
  621. Xunpredictable results from there.
  622. XSee the CURSES INTERFACE section for configuring your
  623. Xenvironment so you enter curses mode each time you run the shell.
  624. X.PP
  625. XString evaluation is allowed in \*Qif\*U expressions, and the operators
  626. X\*Q==\*U and \*Q!=\*U may be used to determine equality or inequality.
  627. XUsually, variables are compared with constants for evaluation.
  628. XNote that it is not possible to compare variables to an empty string, and
  629. Xvariables that evaluate to an empty string may cause errors.
  630. XIt is possible to test whether a variable is set by using the syntax
  631. X\*Q$?variable\*U (as in
  632. X.IR csh )
  633. Xbut there is not currently any way to test for an empty string value.
  634. X.sp
  635. X.in +2
  636. X.nf
  637. Xif $TERM == adm3a
  638. X.ti +4
  639. Xset pager = more
  640. Xelse
  641. X.ti +4
  642. Xset pager = less
  643. Xendif
  644. X.in -2
  645. X.fi
  646. X.sp
  647. XThis segment tests to see if the user's terminal type is \*Qadm3a\*U.
  648. XIf it is, then it sets the pager variable to be the 
  649. X.I more
  650. Xprogram.
  651. XNote that the variable TERM will be gotten from the user's environment if a
  652. Xshell variable is not set already.
  653. XOtherwise, the pager variable is set to \*Qless\*U.
  654. XThis exemplifies the fact that
  655. X.I less
  656. Xfrequently fails to function correctly
  657. Xfor the terminal type \*Qadm3a\*U so we don't use it.
  658. X.sp
  659. XAlso supported in \*Qif\*U expressions are the test flags \*Q-e\*U
  660. Xand \*Q-z\*U.  These flags test to see if a file exists (\*Q-e\*U) or
  661. Xif it is zero-length (\*Q-z\*U).
  662. X.sp
  663. X.nf
  664. X.in +2
  665. Xset mbox = ~/Mail/mbox
  666. Xset newfolder = /usr/spool/mail/$USER
  667. Xif -z $newfolder
  668. X.ti +4
  669. Xset newfolder = $mbox
  670. Xendif
  671. Xif -e $newfolder
  672. X.ti +4
  673. Xfolder $newfolder
  674. Xelse
  675. X.ti +4
  676. Xquit
  677. Xendif
  678. X.fi
  679. X.in -2
  680. X.sp
  681. XThis sets a new variable called \fBnewfolder\fR to the the user's spool
  682. Xmailbox (the system mailbox).  It then tests to see if it is zero length,
  683. Xand if it is, resets the variable to the value of the user's \fBmbox\fR
  684. Xvariable (mbox must be set here).  It then tests to see if the new folder
  685. Xexists.  If it does, it changes folders to the new folder.  If it doesn't
  686. Xexist, the program exits (via \fBquit\fR).
  687. X.PP
  688. XAfter sourcing the initialization file,
  689. X.I Mush
  690. Xreads all the mail out of the specified folder (the system spool directory
  691. Xif no folder is given) and creates a list of messages.
  692. XThe current maximum number of messages the user
  693. Xcan load is set to 1000 by default.
  694. XThe system administrator who configures the program can reset this
  695. Xvalue higher or lower if you ask nicely.
  696. XIf the user has the
  697. X.B sort
  698. Xvariable set, then when the current folder's messages have all been read,
  699. Xthe messages are sorted according to the value of the
  700. Xvariable (see the
  701. X.B sort
  702. Xentry under the VARIABLES heading for more information).
  703. XEach message has a number of message header lines that contain information
  704. Xabout whom the mail is from, the subject of the message, the date it was
  705. Xreceived, and other information about the letter.
  706. XThis information is then compiled into a one-line summary for
  707. Xeach message and is printed out in an appropriate manner
  708. Xdepending on the interface you're using.
  709. X.PP
  710. XAt this point, commands may be input by the user.
  711. XLengthy or complex commands can be placed in a file and then executed via the
  712. X.B source
  713. Xcommand; for example, a filtering file, "filter", might contain:
  714. X.sp
  715. X.in +2
  716. X.nf
  717. Xpick -f Mailer-Daemon | save mail_errors
  718. Xpick -f yukko | delete
  719. Xpick -s -i thesis | save +thesis_mail
  720. Xpick -t unix-wizards | +wizmail
  721. Xupdate
  722. Xsort d
  723. X.in -2
  724. X.fi
  725. X.sp
  726. XThen the first command the user typed might be \*Qsource filter\*U
  727. Xand the following would happen:
  728. XFirst, all messages that have \*QMailer-Daemon\*U in the from line
  729. Xwill be saved in the file mail_errors.
  730. XThen, all mail from the user \*Qyukko\*U will simply be deleted.
  731. XNext, all mail that has in the subject field \*Qthesis\*U
  732. X(case ignored, so \*QThesis\*U would also match) would be
  733. Xsaved in the file $folder/thesis.
  734. XThe next command will find all messages that are addressed to
  735. Xthe group \*Qunix-wizards\*U (of which the user is an elite
  736. Xmember) and save them in the file $folder/wizmail.
  737. XLast, the folder will be updated, removing all deleted mail
  738. X(saved mail may be marked as deleted)
  739. Xand the folder is reread and sorted according to the date of the messages.
  740. X.SH "GENERAL USAGE"
  741. XBecause there are three different interfaces available to the user,
  742. Xthe tty characteristics (backspace, kill-word, kill-line, redraw line)
  743. Xare simulated identically in all interfaces.
  744. XWhen the user has to type something, the 4.2BSD style of tty driver interface
  745. Xis simulated whether you're in the window system, the curses mode, or
  746. Xthe tty-line
  747. Xmode, and even on System-V machines.
  748. XThis means that backspacing causes a
  749. Xbackspace-space-backspace effect (erasing the character backspaced over).
  750. XThe user may reset his tty characteristics using the
  751. X.B stty
  752. Xcommand.
  753. X.PP
  754. X.IR "Displaying messages" .
  755. X.PP
  756. XDepending on the interface you use, you can display any message in your
  757. Xlist of messages as long as the message is not marked for deletion.
  758. XIf the message is marked as deleted, then use the 
  759. X.B undelete
  760. Xcommand supplied by the interface you are using.
  761. XTo display a message in line mode, specify the message using
  762. X.BR print ,
  763. X.BR type ,
  764. X.BR p ,
  765. X.BR t ,
  766. Xor type a message number to display that message on the screen.
  767. X.PP
  768. XIn curses mode, move the cursor over the message you want and type
  769. Xa `t' or `p' to read the message.
  770. XYou may \*Qbind\*U other keys to call
  771. Xthe function that displays messages if `t' and `p' are uncomfortable.
  772. X.PP
  773. XIn the graphics mode, move the mouse over the message you wish to
  774. Xbe displayed and select the LEFT mouse button.
  775. XIf the message you want is not visible (in the header subwindow), you may type,
  776. Xin the message subwindow, the number of the message and hit return.
  777. XThat message number will be displayed.
  778. X.PP
  779. XIn the line or curses mode, if the message has more lines than the variable
  780. X.BR crt ,
  781. Xthen a
  782. X.I pager
  783. Xwill be invoked to allow the user to page through the message without
  784. Xhaving it scroll off the screen.
  785. XThe pager used is determined by the variable
  786. X.BR pager .
  787. XIf that variable is unset, then a default pager will be used.
  788. XNote that if pager is set, but not to a value, or is set to the value
  789. Xof \*Qinternal\*U, then the internal pager is used.
  790. XThe internal pager
  791. Xis very simple; the spacebar displays the next
  792. X.B crt
  793. Xlines, carriage return prints the next line, and \*Qq\*U quits the pager.
  794. X.PP
  795. XIn the tool mode, if a message is larger than the size of the message
  796. Xsubwindow, the amount of the message viewed is displayed and the user
  797. Xmay page through the message via `\\n', `\\r', `j', `J', or `+' (forward
  798. Xby lines), `k', `K', or `-' (backwards
  799. Xby lines), `\ ' or LEFT mouse button (forward by pages), or MIDDLE mouse button
  800. X(backwards by pages).
  801. XThe user may precede the forward and backwards by lines keystrokes with a
  802. Xnumerical
  803. X.I count
  804. Xto specify how many lines to scroll.  This
  805. X.I count
  806. Xremains in effect (across message and folder changes)
  807. Xuntil a new one is specified.
  808. X.PP
  809. XAn alternative to displaying messages is the
  810. X.B top
  811. Xcommand.
  812. XThis command will print just the top few lines of a message.
  813. XThe number of lines is determined by the variable
  814. X.BR toplines .
  815. XIf this variable isn't set,
  816. X.B top
  817. Xwill print a number of lines equal to the value of the variable
  818. X.BR crt .
  819. X.PP
  820. X.IR "Sending mail" .
  821. X.PP
  822. XYou can send mail using the
  823. X.B mail
  824. Xcommand or by responding to other mail.
  825. XIn either case, when you are sending mail, you are in a mode where everything
  826. Xyou type is added to the contents of the message.
  827. XWhen you are done typing your message, you can type `^D'
  828. X(control-D) to signify the end of the message.
  829. XIf you have the variable
  830. X.B dot
  831. Xset, then you can end a message with a `.' on a line by itself.
  832. X.PP
  833. XWhile you are composing a message,
  834. X.I Mush
  835. Xtreats lines beginning with the character `~' specially.
  836. XThis is called a
  837. X.B tilde escape.
  838. XFor instance, typing \*Q~i\*U (alone on a line) will place a copy
  839. Xof the \*Qcurrent message\*U into your message body.
  840. XIt will not include the message headers of the message, just the body of text
  841. Xthat comprises the message.
  842. X.PP
  843. XAvailable
  844. X.BR "tilde escapes" :
  845. X[OPTIONAL arguments in square brackets]
  846. X.TP
  847. X~a file
  848. XAppend message buffer to file name.
  849. X.TP
  850. X~b [bcc-list]
  851. XModify blind carbon recipients; otherwise identical to ~t.
  852. X.TP
  853. X~c [cc-list]
  854. XModify carbon copy recipients; otherwise identical to ~t.
  855. X.TP
  856. X~E[!]
  857. XErase message buffer.
  858. XSave the contents of the letter to \*Qdead.letter\*U
  859. X(unless the `!' is specified) and then clear the message buffer; the user
  860. Xremains in editing mode.
  861. XIf the variable
  862. X.B nosave
  863. Xis set, then `!' need not be specified.
  864. X.TP
  865. X~e [editor]
  866. XEnter the editor.
  867. XDefaults to variable
  868. X.BR editor ,
  869. Xenvironment EDITOR, or
  870. X.IR vi .
  871. X.TP
  872. X~F[!]
  873. XAdd a fortune [don't add] at end of message.
  874. X.TP
  875. X~f [msg-list]
  876. XForward mail.
  877. XThe included messages are not indented,
  878. Xbut are marked as \*Qforwarded mail\*U.
  879. X.TP
  880. X~H [msg-list]
  881. XSame as ~i, but also include the message headers.
  882. X.TP
  883. X~h
  884. XModify all message headers.
  885. XEach header is displayed one by one and each may be edited.
  886. X.TP
  887. X~i [msg-list]
  888. XInclude current message body (or numbered messages).
  889. XSee the descriptions of the variables
  890. X.BR indent_str ,
  891. X.BR pre_indent_str ,
  892. Xand
  893. X.BR post_indent_str .
  894. X.TP
  895. X~p [pager]
  896. XPage the message body.
  897. XDefaults to variable
  898. X.BR pager ,
  899. Xenvironment PAGER, or the default pager set up by the system administrator.
  900. XThis may be the internal pager.
  901. X.TP
  902. X~q
  903. XQuit message; save in ~/dead.letter if
  904. X.B nosave
  905. Xis not set.
  906. X.TP
  907. X~r file
  908. XRead filename into message buffer.
  909. X.TP
  910. X~S[!]
  911. XInclude [don't include] signature at end of message.
  912. XThe variables
  913. X.B autosign
  914. Xand
  915. X.B autosign2
  916. Xdescribe the file or string to append to the message.
  917. XSee the VARIABLES section for more information on these variables.
  918. X.TP
  919. X~s [subject]
  920. XModify the subject header.
  921. XIf an argument is given (a new subject), then the subject line is
  922. X.I replaced
  923. Xby the new subject line.
  924. XIf none is given, then the subject line is
  925. Xdisplayed for editing just as in the ~t command.
  926. X.TP
  927. X~t [list]
  928. XChange list of recipients (\*QTo\*U list).
  929. XIf a list is given, this list is
  930. X.B appended
  931. Xto the current list.
  932. XIf no list is given, then the current list
  933. Xis displayed and the cursor placed at the end of the list.
  934. XYou can backspace over the stuff in the list or you can append more
  935. Xaddresses onto the end of the list as desired.
  936. X.TP
  937. X~u
  938. XUp one line.
  939. XIf the user made a mistake typing a letter and he
  940. Xhas already hit carriage return, he may avoid entering the editor
  941. Xand edit the previous line using ~u.
  942. XThe line is retyped and
  943. Xthe cursor is placed at the end allowing the user to backspace
  944. Xover it and retype the line.
  945. XSystem-V users should note that if
  946. Xthe new line is shorter than it was before the ~u command, the
  947. Xline is padded with blanks to the previous length of the file.
  948. X.TP
  949. X~v [editor]
  950. XEnter the visual editor.
  951. XDefaults to variable
  952. X.BR visual ,
  953. Xenvironment VISUAL, or
  954. X.IR vi .
  955. X.TP
  956. X~w file
  957. XWrite message buffer to file name.
  958. X.TP
  959. X~x
  960. XExit message; don't save in dead.letter.
  961. X.TP
  962. X~$variable
  963. XInsert the string value for variable into message.
  964. XIf a boolean variable is listed, nothing is appended regardless of its value.
  965. X.TP
  966. X~:command
  967. XRun the
  968. X.I Mush
  969. Xcommand specified by \*Qcommand\*U.
  970. XYou may not run any command that sends mail.
  971. XIt is inadvisable to change folders at this time
  972. Xsince the current message list may be corrupted, but the action is
  973. Xallowed nonetheless to provide flexibility for experienced users.
  974. X.TP
  975. X~~
  976. XA line beginning with two escape characters will be unaffected by
  977. X.I Mush
  978. Xexcept that only a single tilde will be inserted into the letter.
  979. X.PP
  980. XThe variable
  981. X.B escape
  982. Xmay be set to describe a character other than `~' to be used as the
  983. Xescape character.
  984. XWhen sending mail, the above tilde escapes are available in
  985. Xall three user interfaces.
  986. X.SH "LINE-MODE INTERFACE"
  987. XIn the line-mode, the user is given a prompt to which commands are issued
  988. Xand arguments are passed to commands.
  989. XWhen the user types at the prompt, each line is parsed and words (or
  990. Xarguments) are separated into an array of strings.
  991. XThis array, also called an
  992. X.IR "argument vector" ,
  993. Xis then modified by expanding history references, command line aliases,
  994. Xand variable references.
  995. XA command line ends when the end of the line is encountered or a pipe (|)
  996. Xor semicolon (;) character is encountered, separating discrete commands.
  997. X.PP
  998. XWhen a command line has been parsed and placed in an argument vector, the
  999. Xfirst argument in the vector (the \*Qcommand\*U) is searched for in a list
  1000. Xof legal
  1001. X.I Mush
  1002. Xcommands.
  1003. XIf found, the function associated with that command is called and
  1004. Xthe rest of the line is passed to that function as
  1005. X.IR "command line arguments" .
  1006. X.PP
  1007. XBefore commands are called, however, the input the user gives is preprocessed
  1008. Xin a style reminiscent of the C-shell
  1009. X.RI ( csh ).
  1010. X.I Mush
  1011. Xalso supports a subset from each of the following aspects of
  1012. X.IR csh :
  1013. X.in +2
  1014. X\(bu Command history.
  1015. X.br
  1016. X\(bu Command line aliasing.
  1017. X.br
  1018. X\(bu \*QPiping\*U mechanism to
  1019. Xredirect \*Qinput\*U and \*Qoutput\*U of commands.
  1020. X.in -2
  1021. X.PP
  1022. X.BR "Command history" .
  1023. X.PP
  1024. XThe history mechanism remembers commands up to the value of the
  1025. X.B history
  1026. Xvariable.
  1027. XIf this variable is not set, only the most recent command is remembered.
  1028. XTo reference previously typed commands, the `!' character
  1029. Xis used in the same manner as in
  1030. X.IR csh .
  1031. XThere is a limited implementation of history modification;
  1032. Xsupported are the argument selectors that reference
  1033. Xcommand line arguments and \*Q:p\*U (echo, but don't execute the command).
  1034. X.sp
  1035. XExamples:
  1036. X.nf
  1037. X.in +2
  1038. X.ta 1i
  1039. X!-2:$    two commands ago, last argument.
  1040. X!3:2-4    the third command, arguments two through four.
  1041. X!!:p    print the last command in its entirety.
  1042. X.in -2
  1043. X.fi
  1044. X.PP
  1045. XDuring the sourcing of initialization files (.mushrc), history is not
  1046. Xin effect and therefore the `!' character does not cause history expansion.
  1047. XThis includes startup of the program and when the command
  1048. X.I source
  1049. Xis issued.
  1050. XUUCP style addresses that contain the `!' character may be given in the
  1051. Xinitialization file without the need to be preceded by a backslash.
  1052. XHowever, `!' does need to be escaped if
  1053. X.BR cmd 's
  1054. Xare used to reference command line arguments.
  1055. X.PP
  1056. X.BR "Command line aliasing" .
  1057. X.PP
  1058. XThis feature enables command substitution similar to
  1059. X.IR csh .
  1060. XTo be backwards compatible with UCB Mail, the
  1061. X.B alias
  1062. Xcommand is used for address aliasing.
  1063. XThus, the command
  1064. X.B cmd
  1065. Xis introduced in place of
  1066. X.BR alias .
  1067. X.PP
  1068. XExamples:
  1069. X.nf
  1070. X.in +2
  1071. Xcmd d delete
  1072. Xcmd t type
  1073. Xcmd dt 'd ; t'
  1074. Xcmd - previous
  1075. Xcmd r 'reply \\!* -e -i'
  1076. X.in -2
  1077. X.fi
  1078. X.sp
  1079. XIn the last example, if the user types \*Qr 5\*U,
  1080. X.I Mush
  1081. Xwill reply to sender of the fifth message and pass all the other
  1082. Xarguments along to the
  1083. X.B reply
  1084. Xcommand.
  1085. XNote the escaping of the `!' character.
  1086. XThis must also be done if set in the initialization file (.mushrc).
  1087. XHad the user not specified a message number on the `r' command line,
  1088. X.B reply
  1089. Xwould respond to the \*Qcurrent message\*U rather than the fifth message.
  1090. X.PP
  1091. X.BR "Piping commands" .
  1092. X.PP
  1093. X\*QOutput\*U from a command is a
  1094. X.BR "message list" ,
  1095. Xnot the
  1096. X.I text
  1097. Xin a message.
  1098. XA
  1099. X.B "message list"
  1100. Xis defined as the set of messages that the user specifies in a command or
  1101. Xthe messages a command affects after it is through executing.
  1102. XWhen one command is piped to another, the effect is that the second command
  1103. Xwill consider only those messages affected by first command.
  1104. XIn most cases,
  1105. X.I Mush
  1106. Xis smart enough to know when piping is occurring and may suppress text output
  1107. Xthat a command might produce.
  1108. X.PP
  1109. XExamples:
  1110. X.sp
  1111. X.ti +2
  1112. Xpick -f fred | save fred_mail
  1113. X.sp
  1114. XThis will find all the messages from \*Qfred\*U
  1115. Xand save them all in the file named fred_mail.
  1116. X.sp
  1117. X.ti +2
  1118. Xlpr 4-8 | delete
  1119. X.sp
  1120. XThis will send messages 4, 5, 6, 7, and 8 to the printer and then delete them.
  1121. X.sp
  1122. X.ti +2
  1123. Xheaders :o | delete
  1124. X.sp
  1125. XDeletes all old (already read) mail.
  1126. X.PP
  1127. XBecause action is taken on mail messages, not files,
  1128. Xmetacharacters such as `*' and `?' are not expanded to file names as
  1129. X.I csh
  1130. Xwould do.
  1131. XInstead,
  1132. X.I Mush
  1133. Xcommands take
  1134. X.I "message lists"
  1135. Xas arguments (a list references one or messages) to take action upon.
  1136. XWhen referencing message numbers,
  1137. X.I Mush
  1138. Xunderstands the following special syntax:
  1139. X.sp
  1140. X.in +2
  1141. X.nf
  1142. X.ta 1.0i
  1143. X*    All messages
  1144. X^    The first message
  1145. X$    The last message
  1146. X\&.    The current message
  1147. XN\-M    A range of messages between N and M, inclusive
  1148. X.sp
  1149. X.fi
  1150. X.in -2
  1151. XIn the last case, N and M may be * ^ $ . or digits referencing
  1152. Xexplicit message numbers.
  1153. XThe range must be in ascending order.
  1154. X.sp
  1155. XYou can also negate messages by placing the message list inside
  1156. Xbraces, `{' `}' \*- thus, the expression \*Q2-19 {11-14}\*U references
  1157. Xmessages 2 through 19 except for messages 11 through 14.
  1158. X.sp
  1159. XNote that message lists are parsed left to right.
  1160. XNegated messages may be reset by turning them on
  1161. Xagain later in the argument list.
  1162. XA common error new users make is to specify a negated list without
  1163. Xspecifying any beginning messages.
  1164. X.sp
  1165. X.ti +2
  1166. Xdelete { 6 }
  1167. X.sp
  1168. XIn this example, the user attempted to delete all messages
  1169. Xexcept for number 6.
  1170. XHe should have specified `*' beforehand.
  1171. XA correct example:
  1172. X.sp
  1173. X.ti +2
  1174. Xpreserve ^-. { 3 }
  1175. X.sp
  1176. XHere, the user specifies a valid message list and causes
  1177. X.I Mush
  1178. Xto preserve all messages from the beginning of the list (message 1)
  1179. Xto the current message, excluding message 3.
  1180. X.PP
  1181. XAs discussed, after the command line is parsed, the command given is
  1182. Xcalled and the rest of the arguments on the command line are passed to it.
  1183. XIf no
  1184. X.I Mush
  1185. Xcommand has been found that matches the one given, then the variable
  1186. X.B unix
  1187. Xis checked.
  1188. XIf it is set,
  1189. X.I Mush
  1190. Xattempts to run the command line as a
  1191. X.IR UNIX (TM)
  1192. Xcommand.
  1193. X.PP
  1194. XIf
  1195. X.B unix
  1196. Xis not set, or if the command could not be found in the user's PATH
  1197. Xenvironment, a message will be printed indicating that the command was
  1198. Xnot found.
  1199. X.PP
  1200. XSince no \*Qmessages\*U are affected by \fIUNIX\fR
  1201. Xcommands, those that appear within \fIMush\fR
  1202. Xpipelines are executed by the \fBpipe\fR command.  A \fIUNIX\fR
  1203. Xcommand may never be the first command in a pipeline unless the \fBpipe\fR
  1204. Xcommand is used explicitly.
  1205. XIf the user wishes to execute \fIUNIX\fR
  1206. Xcommands that are to be piped to one another (or use any sort of redirection),
  1207. Xthe command \fBsh\fR is provided for such purposes.
  1208. XSince \fIMush\fR will parse the entire command line, caution should be
  1209. Xtaken to enclose questionable shell variables or metacharacters with
  1210. Xquotes to prevent \fIMush\fR from expanding them.
  1211. XSee the COMMANDS heading below for more detail.
  1212. X.PP
  1213. XThis shell-like quality is for the convenience of the user and is not
  1214. Xintended to replace the functionality of
  1215. X.IR sh ,
  1216. X.IR csh ,
  1217. Xor any other command interpreter.
  1218. X.SH "CURSES INTERFACE"
  1219. XThe curses interface utilizes the curses routines intrinsic to most
  1220. X.I UNIX
  1221. Xsystems.
  1222. XThis interface is screen oriented rather
  1223. Xthan line oriented and allows the user to access commands and messages
  1224. Xmore quickly at the cost of history, piping, and a few commands.
  1225. X.PP
  1226. XMany users who prefer the curses interface might want to always start
  1227. Xall their mail sessions in the curses interface.
  1228. XPutting the curses
  1229. Xcommand in your initialization file is a no-no, so you can alias your
  1230. Xlogin shell mail command to include the -C option.
  1231. XIf you use the Bourne Shell, you're going to have to type it out all the time.
  1232. XMush will to attempt to know not to run a shell if you're just sending mail to
  1233. Xsomeone, so the
  1234. X.I csh
  1235. Xcommand line sequences:
  1236. X.sp
  1237. X.ti +2
  1238. X% alias mail 'mush -C'
  1239. X.ti +2
  1240. X% mail fred
  1241. X.sp
  1242. Xwill mail to fred and not enter the shell.
  1243. XHowever, if you just said, "mail"
  1244. Xwith no arguments, you'll enter the shell in curses mode if you have mail.
  1245. XIf you don't, you'll be told so, and the shell will not start.
  1246. XIf you want to enter curses mode even if
  1247. Xyou don't have mail, use the \-S option on the command line.
  1248. X.PP
  1249. XIn curses mode, the user's terminal has its \*Qecho\*U turned off so commands
  1250. Xthat are issued are not echoed on the screen.
  1251. XCertain commands cause the mode
  1252. Xto return to normal for typing purposes (sending mail, for example).
  1253. XIn normal operation, the screen will display the current set of message
  1254. Xheaders, the current message number is in the top left corner, the
  1255. Xmail status on the top line, and the cursor will be placed on the current
  1256. Xmessage.
  1257. XThe number of message headers displayed is set by the variable
  1258. X.BR screen .
  1259. XIf the user does not have that variable set, the baud rate is checked and
  1260. Xthe size of the screen is set according to optimal refresh time.
  1261. XUsually, 300 baud gives 7 lines, 1200 gives 14, 2400 gives 22 lines, and all
  1262. Xhigher baud rates give the size of the screen, whatever that may be.
  1263. XNote that the top line is reserved for \*Qstatus\*U and the bottom line is
  1264. Xfor user interaction should it be required.
  1265. X.PP
  1266. XThe user may now type commands via key sequences that are not echoed
  1267. Xto the screen.
  1268. XThus, function keys may be bound to \*Qcommands\*U by using the 
  1269. X.B bind
  1270. Xcommand.
  1271. XA list of key-to-command bindings can be found at runtime by typing `?'
  1272. Xin curses mode or by using the
  1273. X.B bind
  1274. Xcommand in line mode.
  1275. X.PP
  1276. XThe commands to which you can map sequences are intended to be as self
  1277. Xexplanatory as possible, but admittedly, it's easier to figure out via
  1278. Xtrial and error than to try to wade through this documentation.
  1279. XA list of the legal curses commands can be obtained when executing the
  1280. Xbind command.
  1281. XRegular tty line-mode commands are not issued from
  1282. Xthe curses interface; only special curses mode commands are understood.
  1283. XThe current list of valid curses commands is:
  1284. X.sp
  1285. X.ta 1.5i 3i 4.5i
  1286. X.in +4
  1287. X.nf
  1288. Xalias    back-msg    bind    bind-macro
  1289. Xbottom-page    chdir    copy    copy-list
  1290. Xdelete    delete-list    display    display-next
  1291. Xexit    exit!    first-msg    folder
  1292. Xgoto-msg    ignore    last-msg    line-mode
  1293. Xlpr    mail    mail-flags    map
  1294. Xmap!    my-hdrs    next-msg    preserve
  1295. Xquit    quit!    redraw    reply
  1296. Xreply-all    reverse-video    save    save-list
  1297. Xsaveopts    screen-back    screen-next    search-again
  1298. Xsearch-back    search-next    shell-escape    sort
  1299. Xsort-reverse    source    top    top-page
  1300. Xunbind    undelete    undelete-list    update
  1301. Xvariable    version    write    write-list
  1302. Xhelp
  1303. X.fi
  1304. X.in -4
  1305. X.sp
  1306. X.PP
  1307. XThe following is a list of default key-command bindings.
  1308. XIf you specify bind commands in your initialization file that conflict with
  1309. Xthese defaults, your settings will override the defaults.
  1310. XThe default settings given here
  1311. Xuse the ^-character method to indicate control characters.
  1312. XThus, `^X' would mean control-X even
  1313. Xthough you'd have to type \*Q\\CX\*U to set
  1314. Xthe binding and actually use the control key and the `X' key simultaneously
  1315. Xto really
  1316. X.I do
  1317. Xa Control-X.
  1318. XThis is mostly because nroff makes printing the backslash
  1319. Xcharacter so amazingly difficult.
  1320. X.TP
  1321. X\&., t, p, T=top, n=next
  1322. XDisplay (type/print) message.
  1323. XTop will display the first
  1324. X.B crt
  1325. Xlines of a message.
  1326. XNext will print the next message.
  1327. XIf the current message is deleted, the next undeleted message is found.
  1328. XYou might notice this is different from the line mode, which will return
  1329. Xan error message that the current message is marked as deleted.
  1330. X.TP
  1331. X+, j, J, RETURN
  1332. XGo to next message.
  1333. X.TP
  1334. X-, k, K, ^K
  1335. XGo to previous message.
  1336. X.TP
  1337. X^, $
  1338. XGo to first/last message.
  1339. X.TP
  1340. X{, }
  1341. XGo to top/bottom of screen.
  1342. X.TP
  1343. Xa
  1344. XSet aliases.
  1345. X.TP
  1346. Xb, B
  1347. XSet/unset bindings.
  1348. X.TP
  1349. Xd, D, u, U
  1350. XDelete/undelete messages (capitals prompt for message list).
  1351. X.TP
  1352. Xf
  1353. XChange folder.
  1354. XIf current folder has changed, verification for update will be requested.
  1355. X.TP
  1356. Xg, 0-9
  1357. XGo directly to a specified message.
  1358. XWhen the \*Qgoto\*U command
  1359. Xis selected, a prompt at the bottom of the window prompts for a
  1360. X.BR "message list" .
  1361. XAnything that describes a message list may be used.
  1362. XSince
  1363. X.I Mush
  1364. Xcommands return message lists, a legal
  1365. X.I Mush
  1366. Xcommand enclosed in backquotes may be used to go to a particular message.
  1367. XThe new current message pointer will point to the next
  1368. Xmessage, returned by the command, that is below the old current message.
  1369. XAn example:
  1370. X.sp
  1371. X.ti +2
  1372. Xgoto msg: `pick \-f argv`
  1373. X.sp
  1374. XThis will cause the current message to move to the first message
  1375. Xin the current folder from the user \*Qargv\*U that comes after the
  1376. Xmessage pointed to when the \*Qgoto\*U was issued.
  1377. XSo, if messages 1 and 5
  1378. Xare from the user \*Qargv\*U and the current message the user was on
  1379. Xwas message 3, then the new current message would be message 5, since it
  1380. Xis the first message found after message 3 that is from \*Qargv\*U.
  1381. XIf none of the messages are found after the current message, the new
  1382. Xcurrent message will be the first one returned by the command.
  1383. X.TP
  1384. Xh
  1385. XSet personal headers.
  1386. X.TP
  1387. Xi
  1388. XSet ignored headers.
  1389. X.TP
  1390. Xm, M
  1391. XSend mail (capital prompts for mail flags).
  1392. X.TP
  1393. Xo, O
  1394. XOrder messages (sort; capital reverses order).
  1395. XA prompt requests the sort constraints.
  1396. X.TP
  1397. Xq, Q, x, X
  1398. XQuit/exit.
  1399. X\&`q' will test to see if the current folder has been updated and prompt
  1400. Xthe user to verify updating.
  1401. X\&`x' does not update mail, but quits the program.
  1402. X\&`Q' does not prompt for update verification; if changes were
  1403. Xmade, updating is automatic.
  1404. X\&`Q' (quit!) and `X' (exit!) will work even when typed at the
  1405. X\*Q...continue...\*U prompt, whereas `q' and `x' will not.
  1406. X.TP
  1407. Xr, R
  1408. XReply/reply all.
  1409. X.TP
  1410. Xs, S, c, C, w, W
  1411. XSave, copy, or write messages (capitals prompt for message lists).
  1412. X.TP
  1413. Xv
  1414. XSet regular variables (as opposed to environment variables).
  1415. X.TP
  1416. XV
  1417. XPrint version number.
  1418. X.TP
  1419. Xz, Z
  1420. XPrint next/previous screenful of message headers.
  1421. X.TP
  1422. X^L
  1423. XRedraw the screen.
  1424. X.TP
  1425. X^P
  1426. XPreserve current message (toggle).
  1427. X.TP
  1428. X^U
  1429. XUpdate folder.
  1430. XA prompt will request confirmation.
  1431. X.TP
  1432. X^R
  1433. XToggle reverse video mode (current message is in reverse video).
  1434. X.TP
  1435. X|
  1436. XSend message to printer
  1437. X.TP
  1438. X!
  1439. XShell Escape.
  1440. XPrompts for command; RETURN invokes a shell.
  1441. X.TP
  1442. X%
  1443. Xchange directory.
  1444. X.TP
  1445. X(, )
  1446. XSource/saveopts.
  1447. XPrompts for file name.
  1448. X.TP
  1449. X/, ^/, ^N
  1450. XForward, backward, continue search for patterns.
  1451. XEntire messages are not searched for here.
  1452. XOnly the text available on the screen is searched for.
  1453. XNote that some terminals use `^_' (control-underscore) for `^/',
  1454. Xso you may wish to re-bind this key.
  1455. X.TP
  1456. X&&
  1457. XCreate a curses mode macro.
  1458. X.TP
  1459. X&:
  1460. XCreate a line mode macro.
  1461. X.TP
  1462. X&!
  1463. XCreate a composition mode macro.
  1464. X.TP
  1465. X:[cmd]
  1466. XEnter line mode for one command.
  1467. XHistory is not recorded for this escape,
  1468. Xand line mode macros are not available.
  1469. XIf no command is given, curses mode
  1470. Xis exited and the session continues in line mode
  1471. X(in which case history and macros become available).
  1472. X.PP
  1473. XWhen setting new key sequences to be bound to commands, the user may
  1474. Xuse control keys and the ESCAPE character for extended commands.
  1475. XExceptions are control-C, control-\\, and possibly other control characters
  1476. Xdepending on your system's configuration or your current tty mode settings.
  1477. X.PP
  1478. XWhen assigning key sequences to commands, the user enters the
  1479. X.B bind
  1480. Xcommand and prompting is done.
  1481. XIf the
  1482. Xuser wishes to have control characters or the escape character in a key
  1483. Xsequence while still using ASCII format, a special notation for control
  1484. Xcharacters is provided.
  1485. XThis sequence is used primarily for the use of
  1486. Xbinding control character sequences in the initialization file.
  1487. XThis format
  1488. Xis also used to display the current key-command mappings by the program.
  1489. X.PP
  1490. XTo specify control characters in ascii format for the bind command, the
  1491. Xsequence \*Q\\Cc\*U is used where `c' is the
  1492. Xcharacter that the control key will translate to and must be in upper case.
  1493. XThe sequence \*Q\\CP\*U would map to control-P.
  1494. XIf the user wishes to indicate the RETURN key, this is specified
  1495. Xwith the string \*Q\\n\*U and
  1496. Xthe tab key is specified by the string \*Q\\t\*U.
  1497. XAs a more complex example, on a Wyse-50 terminal, the 8th function key
  1498. Xoutputs the three characters: control-A, H, line-feed.
  1499. XTo map this function key to a command, the
  1500. Xuser would have to enter the sequence \*Q\\CAH\\n\*U as the key sequence,
  1501. Xthen follow up with a valid curses command.  From then on, if the user
  1502. Xpresses that function key,
  1503. Xthe command mapped to it will be executed.
  1504. X.PP
  1505. XThe ESCAPE key is signified by the sequence, \*Q\\E\*U.
  1506. XOn a Sun-3 workstation,
  1507. Xthe R1 key outputs the character sequence: ESC, [, 2, 0, 8, z.
  1508. XThe corresponding
  1509. X.B bind
  1510. Xkey sequence would be \*Q\\E[208z\*U.
  1511. XRestrictions are that key sequences may not contain the space character
  1512. Xunless bound in line mode, and can never begin with a digit.
  1513. X.PP
  1514. XWhenever a command is entered, other than `^L'
  1515. X.RB ( redraw ),
  1516. Xwhich causes the screen to scroll or be refreshed in any way,
  1517. X.I Mush
  1518. Xis left in the
  1519. X.I continue
  1520. Xmode.
  1521. XWhen in this mode, the user is given his line-mode prompt followed
  1522. Xby \*Q...continue...\*U indicating that he may issue a new command or
  1523. Xreturn to the top level where the current message headers are displayed
  1524. Xon the screen.
  1525. XRemember that this is still the curses mode, but much time
  1526. Xis saved by avoiding redrawing the screen after each command.
  1527. XThe user may move up and down messages using the appropriate commands
  1528. X(j/k by default) or anything else the curses mode allows.
  1529. XOnly the exit and quit commands will return to the top level.
  1530. XBecause of this, there are 2 additional
  1531. Xways to \*Qquit\*U from curses mode and return to the login shell.
  1532. XThe \*Qexit\*U and \*Qquit\*U commands will quit from the top level, but
  1533. Xthe commands
  1534. X.B exit!
  1535. Xand 
  1536. X.B quit!
  1537. Xare used to exit from the \*Qcontinue\*U level in the curses interface as well
  1538. Xas from the top level.
  1539. X.PP
  1540. XNote that the best way to understand the curses interface is to just use it.
  1541. XIn line mode, the command \*Qcurses\*U puts you into curses mode.
  1542. X.SH "GRAPHICS INTERFACE"
  1543. XWhen running the window-based graphics interface, there will be 5
  1544. Xwindows displaying panels of commands, message headers and a text
  1545. Xwindow which is used for displaying messages or writing messages
  1546. Xto send to other users.
  1547. X.PP
  1548. XThe panel items have labels describing their functionality.
  1549. XSelecting
  1550. Xa panel item with the LEFT mouse button causes the action to be executed.
  1551. XThe RIGHT mouse button displays a menu of options that the command may
  1552. Xbranch to.
  1553. XFor example, the
  1554. X.B save
  1555. Xpanel item by default will save messages to the file \*Qmbox\*U, but the
  1556. XRIGHT mouse button causes a menu to be displayed, and the choices of
  1557. Xwhere to save the message increase to include the items in the menu.
  1558. XThese typically include the files in the user's folder directory (see the
  1559. X.B folder
  1560. Xvariable below).
  1561. X.PP
  1562. XAt the end of each list of menu entries for panel items is an item
  1563. Xlabelled \*Qhelp\*U.
  1564. XWhen this item is chosen, help for that command
  1565. Xis displayed in the center of the console.
  1566. X.PP
  1567. XWhen composing letters, the interface is the same for the tool mode,
  1568. Xthe line mode and the curses mode.
  1569. XTilde escapes are recognized by all
  1570. Xthe interfaces, but the tool interface allows the user to use the menu
  1571. Xmouse button to select the tilde escape desired.
  1572. X.PP
  1573. XIf the user wishes to review a mail message while in edit-mode, he may
  1574. Xdo as the other interfaces and enter the tilde escape command \*Q~:print\*U.
  1575. XThis will cause the current message (or the numbered message, if given) to
  1576. Xbe displayed in the window.
  1577. XEditing is temporarily put on hold till the user
  1578. Xenters a `q' in the message window to indicate that he is done reading the
  1579. Xmessage and input is to be directed again to the letter being composed.
  1580. X.SH COMMANDS
  1581. XDescribed below are legal commands understood by
  1582. X.I Mush
  1583. Xthat you can type at the line mode prompt.
  1584. XMost commands have abbreviations
  1585. X(given in parentheses) and can be followed by message lists.
  1586. XIn most cases,
  1587. Xwhitespace is not necessary to separate commands from message lists.
  1588. XFor example, \*Qd*\*U will delete all messages, and \*Qu1-7 {4}\*U will
  1589. Xundelete messages 1 through 7 except for message number 4.
  1590. X.PP
  1591. XThe ability to customize commands using the
  1592. X.B cmd
  1593. Xfacility allows users to customize
  1594. X.I Mush
  1595. Xto resemble other mailers.
  1596. XHowever, efforts have already been made to include commands that are backwards
  1597. Xcompatible with other line-mode mailers.
  1598. XUsers of the graphics tool mode of
  1599. X.I Mush
  1600. Xmay have little need for the command line mode because the icon based
  1601. Xinterface allows interaction with many commands.
  1602. XThe graphics mode is much more restrictive in favor of user
  1603. Xfriendliness but most useful commands may be achieved anyway.
  1604. X.PP
  1605. XThe following is a list of all recognized commands.
  1606. XSince most commands accept a
  1607. X.I "message list"
  1608. Xas an argument, arguments are noted only when they differ from a message list.
  1609. X.TP
  1610. X.BR alias " [name] [address-list]"
  1611. X.ns
  1612. X.TP
  1613. X.BR unalias " name"
  1614. XThe
  1615. X.B alias
  1616. Xcommand defines a name to stand for a list of addresses.
  1617. XThe defined name can then be substituted for the entire list when
  1618. Xsending mail.
  1619. XFor example,
  1620. END_OF_FILE
  1621. if test 49833 -ne `wc -c <'mush.1.1'`; then
  1622.     echo shar: \"'mush.1.1'\" unpacked with wrong size!
  1623. fi
  1624. # end of 'mush.1.1'
  1625. fi
  1626. echo shar: End of archive 19 \(of 19\).
  1627. cp /dev/null ark19isdone
  1628. MISSING=""
  1629. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
  1630.     if test ! -f ark${I}isdone ; then
  1631.     MISSING="${MISSING} ${I}"
  1632.     fi
  1633. done
  1634. if test "${MISSING}" = "" ; then
  1635.     echo You have unpacked all 19 archives.
  1636.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1637. else
  1638.     echo You still need to unpack the following archives:
  1639.     echo "        " ${MISSING}
  1640. fi
  1641. ##  End of shell archive.
  1642. exit 0
  1643.